import threading
import tkinter
from _tkinter import TkappType
from tkinter import *

import time


import win32api
import win32con

from Tkinter.thread_kill import stop_thread

root = Tk()
photo = PhotoImage(file="snowflake.gif")    # 声明一下图片 .
theLabel = Label(root,
                 text="模拟用户浏览首页商品",  # 载入文本
                 justify=CENTER,     # 声明文本的位置
                 image=photo,        # 载入图片
                 compound=CENTER,   #声明图片的位置
                 font=("楷体", 20),   # 声明文本字体
                 fg="green"    # 声明文本颜色 .
                 )
theLabel.pack()     # 自动调整布局
# 显示倒计时Label
# lbTime = tkinter.Label(root,fg='red',anchor = 'w')
# lbTime.place(x=380,y=260,width=250)
#
# def autoClose():
#     for i in range(5):
#         lbTime['text'] = '距离窗口关闭还有{}秒'.format(5-i)
#         time.sleep(1)
#     root.destroy()
#     root.quit()
#
#
# t=threading.Thread(target=autoClose)
# t.start()

mainloop()
# root.after_cancel(root)




# stop_thread(t)

